package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;
import vns.shared.ObjectTypeGoogleAccountUserDTO;

public class ObjectTypeGoogleAccountUser {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private User value;
	
	public ObjectTypeGoogleAccountUser(ObjectTypeGoogleAccountUserDTO objectTypeGoogleAccountUserDTO){
		this.value=objectTypeGoogleAccountUserDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeGoogleAccountUserDTO objectTypeGoogleAccountUserDTO){
		this.value=objectTypeGoogleAccountUserDTO.getValue();
	}
	
	public ObjectTypeGoogleAccountUserDTO toDTO(){
		ObjectTypeGoogleAccountUserDTO otGoogleAccountUser=new ObjectTypeGoogleAccountUserDTO(this.id,this.value);
		return otGoogleAccountUser;
	}
	
	public Key getId(){
		return id;
	}
	
	public User getValue(){
		return value;
	}
	
	public void setValue(User Value){
		this.value=Value;
	}
}
